﻿<%@ Page Title="Yeni Kullanıcı Tanımla" Language="C#" MasterPageFile="~/TapuKadastro.master"
    AutoEventWireup="True" Inherits="IKYSWeb.Yetki.Yetki_Kullanici" CodeBehind="Kullanici.aspx.cs" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Src="../UserControls/Tarih.ascx" TagName="Tarih" TagPrefix="uc1" %>
<%@ Register Src="../UserControls/AutoComplete.ascx" TagName="AutoComplete" TagPrefix="uc2" %>
<%@ Register Src="../UserControls/YetkiKontrol.ascx" TagName="YetkiKontrol" TagPrefix="uc4" %>
<%@ Register Src="../UserControls/CokluSecim.ascx" TagName="CokluSecim" TagPrefix="uc3" %>
<asp:Content ID="Content1" ContentPlaceHolderID="CPH" runat="Server">
    <h3 class="title">
        <asp:Label runat="server" ID="lblBaslik">Yetki ışlemleri &#8594; Kullanıcı Ara</asp:Label>
    </h3>
    <asp:MultiView runat="server" ID="mv" ActiveViewIndex="0">
        <asp:View runat="server" ID="vListe">
            <table class="form">
                <tr>
                    <td class="label">
                        Adı Soyadı
                    </td>
                    <td>
                        <asp:TextBox ID="txtAdiAra" runat="server" Width="95px"></asp:TextBox>
                        <asp:TextBox ID="txtSoyadiAra" runat="server" Width="95px"></asp:TextBox>
                    </td>
                    <td class="label">
                        Kullanıcı Adı
                    </td>
                    <td>
                        <asp:TextBox ID="txtKullaniciAdiAra" runat="server" Width="200px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="label">
                        Aktif/Pasif
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlAktifPasifAra" runat="server" Width="208px" />
                    </td>
                    <td class="label">
                        Kullanıcı Türü
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlKullaniciTurAra" runat="server" Width="208px">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="label">
                        Yetkili ıli-ılçesi
                    </td>
                    <td colspan="3">
                        <asp:DropDownList ID="ddlIlAra" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlIlAra_SelectedIndexChanged"
                            Width="102px">
                        </asp:DropDownList>
                        <asp:DropDownList ID="ddlIlceAra" runat="server" Width="102px">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr align="left">
                    <td class="buton" colspan="1" align="left">
                        <asp:Button ID="btnTemizle" runat="server" Text="Temizle" OnClick="btnTemizle_Click" />
                    </td>
                    <td class="buton" colspan="2" align="center">
                        <asp:Button ID="Button2" runat="server" Text="Listele" OnClick="btnAra_Click" />
                    </td>
                    <td class="buton" colspan="1" align="right">
                        <asp:Button ID="Button6" runat="server" Text="Yeni Kayıt" CausesValidation="False"
                            OnClick="btnYeniKayit_Click" />
                    </td>
                </tr>
            </table>
            <asp:GridView ID="grdListe" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                CssClass="grid" EmptyDataText="Tanımlı kullanıcı bulunamadı." DataKeyNames="KullaniciID,Durum"
                PageSize="20" OnRowCommand="grdListe_RowCommand" OnPageIndexChanging="grdListe_PageIndexChanging"
                OnRowDataBound="grdListe_RowDataBound">
                <Columns>
                    <asp:BoundField DataField="ADSOYAD" HeaderText="Adı Soyadı" />
                    <asp:BoundField DataField="KullaniciAdi" HeaderText="Kullanıcı Adı" />
                    <asp:BoundField HeaderText="Kullanıcı Türü" />
                    <asp:BoundField DataField="YetkiliBirim" HeaderText="Görev Yeri" />
                    <asp:BoundField HeaderText="Durumu" />
                    <asp:BoundField DataField="SonGecerlilikTarihi" HeaderText="Son Geçerlilik Tarihi"
                        DataFormatString="{0:dd.MM.yyyy}" />
                    <asp:ButtonField ControlStyle-CssClass="grd_Guncelle" CommandName="Guncelle" Text="Güncelle" />
                    <asp:ButtonField ControlStyle-CssClass="grd_Sil" CommandName="Sil" Text="Sil" />
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:HyperLink ID="lnkOdeme" runat="server" CssClass="modalize" Text="Ödeme Bilgileri">
                            </asp:HyperLink>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <RowStyle CssClass="even" />
                <AlternatingRowStyle CssClass="odd" />
                <EditRowStyle CssClass="odd" />
                <EmptyDataRowStyle CssClass="empty" />
            </asp:GridView>
        </asp:View>
        <asp:View runat="server" ID="vKayit">
            <table class="form">
                <tr>
                    <td class="label">
                        Kullanıcı Tür
                    </td>
                    <td colspan="3">
                        <asp:DropDownList ID="ddlKullaniciTur" runat="server" Width="208px" AutoPostBack="true"
                            OnSelectedIndexChanged="ddlKullaniciTur_SelectedIndexChanged">
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator ID="rfvKullaniciTur" runat="server" ControlToValidate="ddlKullaniciTur"
                            ErrorMessage="Kullanıcı türünü seçiniz" Display="Dynamic" InitialValue="-1" ValidationGroup="kaydet"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr runat="server" id="trYetkiliBirim" visible="false">
                    <td class="label">
                        Yetkili Bölge
                    </td>
                    <td colspan="3">
                        <uc4:YetkiKontrol ID="ucYetkiliBirim" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td class="label">
                        Kullanıcı Adı
                    </td>
                    <td colspan="3">
                        <asp:TextBox ID="txtKullaniciAdi" runat="server" Width="200px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvKullaniciAdi" runat="server" ControlToValidate="txtKullaniciAdi"
                            ValidationGroup="kaydet" ErrorMessage="Kullanıcı adı giriniz!" Display="Dynamic"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="label" style="width: 20%">
                        Şifre
                    </td>
                    <td style="width: 30%">
                        <asp:TextBox ID="txtSifre" runat="server" TextMode="Password" Width="200px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvSifre" runat="server" ErrorMessage="Bir şifre giriniz!"
                            ValidationGroup="kaydet" ControlToValidate="txtSifre" Display="Dynamic"></asp:RequiredFieldValidator>
                    </td>
                    <td class="label" style="width: 20%">
                        Şifre Tekrar
                    </td>
                    <td style="width: 30%">
                        <asp:TextBox ID="txtSifre2" runat="server" TextMode="Password" Width="200px"></asp:TextBox>
                        <asp:CompareValidator ID="cmpSifre" runat="server" ErrorMessage="şifre tekrarı girilen şifre ile aynı olmalıdır."
                            ValidationGroup="kaydet" ControlToCompare="txtSifre2" ControlToValidate="txtSifre"
                            Display="Dynamic"></asp:CompareValidator>
                    </td>
                </tr>
                <tr>
                    <td class="label">
                        TC Kimlik No
                    </td>
                    <td>
                        <asp:TextBox ID="txtTckimlikNo" runat="server" Width="200px" CssClass="int" MaxLength="11"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvTCNo" runat="server" ErrorMessage="Lütfen TC Kimlik No giriniz"
                            ValidationGroup="kaydet" ControlToValidate="txtTCKimlikNo" Display="Dynamic"></asp:RequiredFieldValidator>
                        <asp:RangeValidator ID="rvTCNo" runat="server" ErrorMessage="RangeValidator" ControlToValidate="txtTCKimlikNo"
                            MaximumValue="100000000000" MinimumValue="10000000000" Type="Double" Display="Dynamic">TC Kimlik No 11 hane olmalıdır.</asp:RangeValidator>
                    </td>
                    <td class="label">
                        Adı Soyadı
                    </td>
                    <td>
                        <asp:TextBox ID="txtAdi" runat="server" Width="94px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvAdi" runat="server" ControlToValidate="txtAdi"
                            ValidationGroup="kaydet" ErrorMessage="Adını giriniz" Display="Dynamic"></asp:RequiredFieldValidator>
                        <asp:TextBox ID="txtSoyadi" runat="server" Width="94px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvSoyadi" runat="server" ControlToValidate="txtSoyadi"
                            ValidationGroup="kaydet" ErrorMessage="Soyadını giriniz!" Display="Dynamic"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="label">
                        Son Geçerlilik Tarihi
                    </td>
                    <td>
                        <uc1:Tarih ID="ucSonGecerlilikTarihi" runat="server" HataMesaji="Son Geçerlilik Tarihini Seçiniz"
                            ValidationGroup="kaydet" Width="400" />
                    </td>
                    <td class="label">
                        BüroNo/BelgeNo/Sicil No
                    </td>
                    <td>
                        <asp:TextBox ID="txtBuroNo" runat="server" Width="60px" MaxLength="4"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvBuroNo" runat="server" ControlToValidate="txtBuroNo"
                            ValidationGroup="kaydet" ErrorMessage="Büro No giriniz!" Display="Dynamic"></asp:RequiredFieldValidator>
                        <asp:CompareValidator ID="cv" runat="server" ControlToValidate="txtBuroNo" Type="Integer"
                            Operator="DataTypeCheck" ErrorMessage="Numerik bir deðer giriniz!" Display="Dynamic"></asp:CompareValidator>
                        <%--                        <asp:RegularExpressionValidator ID="rev" runat="server"  ControlToValidate="txtBuroNo"
                             ValidationExpression ="^\d+?$"  ErrorMessage="Numerik + karakterli bir deðer giriniz!"></asp:RegularExpressionValidator>--%>
                        <asp:TextBox ID="txtBelgeNo" runat="server" Width="60px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvBelgeNo" runat="server" ControlToValidate="txtBelgeNo"
                            ValidationGroup="kaydet" ErrorMessage="Belge No giriniz!" Display="Dynamic"></asp:RequiredFieldValidator>
                        <asp:TextBox ID="txtSicilNo" runat="server" Width="60px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="rfvSicilNo" runat="server" ControlToValidate="txtSicilNo"
                            ValidationGroup="kaydet" ErrorMessage="Sicil No giriniz!" Display="Dynamic"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="label">
                        Büro Telefonu
                    </td>
                    <td>
                        <telerik:RadMaskedTextBox ID="txtBuroTel" runat="server" Font-Size="Small" Mask="(###)-###-####"
                            AllowEmptyEnumerations="false">
                        </telerik:RadMaskedTextBox>
                    </td>
                    <td class="label">
                        Büro Faks
                    </td>
                    <td>
                        <telerik:RadMaskedTextBox ID="txtBuroFaks" Font-Size="Small" Mask="(###)-###-####"
                            runat="server" AllowEmptyEnumerations="false">
                        </telerik:RadMaskedTextBox>
                    </td>
                </tr>
                <tr>
                    <td class="label">
                        Cep Telefonu(1)
                    </td>
                    <td>
                        <telerik:RadMaskedTextBox ID="txtCepNo1" Font-Size="Small" Mask="(###)-###-####"
                            runat="server" AllowEmptyEnumerations="false">
                        </telerik:RadMaskedTextBox>

                    </td>
                    <td class="label">
                        Cep Telefonu(2)
                    </td>
                    <td>
                        <telerik:RadMaskedTextBox ID="txtCepNo2" Font-Size="Small" Mask="(###)-###-####"
                            runat="server" AllowEmptyEnumerations="false">
                        </telerik:RadMaskedTextBox>

                    </td>
                </tr>
                <tr>
                    <td class="label">
                        Aktiflik/Pasif
                    </td>
                    <td>
                        <asp:DropDownList ID="ddlAktiflikDurum" runat="server" Width="208px">
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="ddlAktiflikDurum"
                            ValidationGroup="kaydet" ErrorMessage="Kullanıcı durumunu seçiniz" Display="Dynamic"
                            InitialValue="-1"></asp:RequiredFieldValidator>
                    </td>
                    <td class="label">
                        Açıklama
                    </td>
                    <td>
                        <asp:TextBox ID="txtAciklama" runat="server" Height="52px" TextMode="MultiLine" Width="80%"></asp:TextBox>
                    </td>
                </tr>
                <tr runat="server" id="trLisansSahibiKullanici" visible="false">
                    <td class="label">
                        Lisans Sahibi Kullanıcı
                    </td>
                    <td colspan="3">
                        <asp:DropDownList ID="ddlLisansSahibiKullanıcı" runat="server" Width="208px">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td colspan="4" class="buton">
                        <asp:Button ID="btnGeri" runat="server" CssClass="btn_back" Text="Geri" CausesValidation="False"
                            OnClick="btnGeri_Click" />
                        <asp:Button ID="btnKaydet" runat="server" Text="Kullanıcı Kaydet" OnClick="btnKaydet_Click"
                            ValidationGroup="kaydet" />
                    </td>
                </tr>
            </table>
        </asp:View>
    </asp:MultiView>
</asp:Content>
